import React from 'react'
import { render } from 'react-dom'
import { Router, Route, IndexRoute } from 'react-router'
import MainView from './MainView.jsx'
import RootView from './RootView.jsx'
import DrillView from './DrillView.jsx'
import TraceView from './TraceView.jsx'
import history from '../common/history.es6';

render((
  <Router history={ history }>
    <Route path="/" component={MainView} >
      <Route path="ip/:ip" component={DrillView} />
      <Route path="ip/:ip/port/:port" component={DrillView} />
      <Route path="trace/:traceId" component={TraceView} />
      <IndexRoute component={RootView} />
    </Route>
  </Router>
), document.getElementById('root'));
